package com.vodone.v1pin.video.delegate
{
	import com.vodone.v1pin.ServiceProvider;
	import com.vodone.v1pin.core.model.MainModelLocator;
	import com.vodone.v1pin.core.service.HttpJsonDelegate;
	
	import mx.rpc.http.mxml.HTTPService;
	public class CommentDelegate
	{
		public static function getCommentList( resultHandler:Function , vID:String , endtime:String = "0" , faultHandler:Function = null , context:Array = null ):void
		{
			var service:HTTPService = ServiceProvider.getInstance().getCommentList;
			var params:Object = {
				userID : MainModelLocator.getInstance().userLoginVO.userId,
				vID:vID,
				endtime:endtime
			}
			var delegate:HttpJsonDelegate = new HttpJsonDelegate( service );
			delegate.send( params , resultHandler , faultHandler , context );
		}
		public static function addCommentList( resultHandler:Function , vID:String , message:String , faultHandler:Function = null , context:Array = null ):void
		{
			var service:HTTPService = ServiceProvider.getInstance().addComment;
			var params:Object = {
				userID : MainModelLocator.getInstance().userLoginVO.userId,
				vID:vID,
				message:message
			}
			var delegate:HttpJsonDelegate = new HttpJsonDelegate( service );
			delegate.send( params , resultHandler , faultHandler , context );
		}
	}
}